/**
 * optionsDialog.js
 * Copyright (C) 2007-2011 Tommi Rautava
 * 
 * This file is part of Popmungo.
 *
 * Popmungo is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 3 of the License, or
 * (at your option) any later version.
 * 
 * Popmungo is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/

org.mozdev.popmungo.OptionsDialog = {
	userOptionsPaneIsLoaded: false,
	
	onLoad: function onLoad() {
		org.mozdev.popmungo.logger.debug("org.mozdev.popmungo.OptionsDialog onLoad event");

		return true;
	},
	
	onDialogAccept: function onDialogAccept() {
		try {
			org.mozdev.popmungo.logger.debug("onDialogAccept event");

			// Store the current character options.
			if (org.mozdev.popmungo.OptionsDialog.userOptionsPaneIsLoaded) {
				org.mozdev.popmungo.UserOptions.userOptionsApply();
			}
		}
		catch (err) {
			org.mozdev.popmungo.logger.logError(err);
		}
		
		return true;
	}
	
};

org.mozdev.popmungo.logger.log("org.mozdev.popmungo.OptionsDialog loaded");

// EOF